﻿using System;
using System.IO;

namespace Utilities
{
    public class ReadFile
    {
        private StreamReader reader;
        private string data;

        public ReadFile()
        {
            reader = new StreamReader(new FileStream(@"logs\Info.log", FileMode.Open));
        }

        public bool ReadNext()
        {
            return (data = reader.ReadLine()) != null;
        }

        public void CloseFile()
        {
            if (reader != null)
                reader.Close();
        }

        public string Data
        {
            get { return this.data; }
        }

    }
}
